The present invention relates generally to the field of computer systems and, more particularly, to systems and methods for automating the task of developing application programs.
Before a digital computer may accomplish a desired task, it must receive an appropriate set of instructions. Executed by the computer's microprocessor, these instructions, collectively referred to as a "computer program," direct the operation of the computer. Expectedly, the computer must understand the instructions which it receives before it may undertake the specified activity.
Owing to their digital nature, computers essentially only understand "machine code," i.e., the low-level, minute instructions for performing specific tasks--the sequence of ones and zeros that are interpreted as specific instructions by the computer's microprocessor. Since machine language or machine code is the only language computers actually understand, all other programming languages represent ways of structuring human language so that humans can get computers to perform specific tasks.
While it is possible for humans to compose meaningful programs in machine code, practically all software development today employs one or more of the available programming languages. The most widely used programming languages are the "high-level" languages, such as C or Pascal. These languages allow data structures and algorithms to be expressed in a style of writing which is easily read and understood by fellow programmers.
A program called a "compiler" translates these instructions into the requisite machine language. In the context of this translation, the program which is written in the high-level language is called the "source code" or source program. The low-level or machine language, on the other hand, comprises "object code." Once created, object code (e.g., .obj file) is a separate program in its own right--it includes instructions which may be executed by the target microprocessor. In practice, however, the object code is usually first linked (i.e., combined) with other object code or libraries, which include standard routines.
Compilers are fundamental to modem computing. Translating human-oriented programming languages into computer-oriented machine languages, compilers allow computer programmers to ignore the machine-dependent details of machine language. Instead of focusing on the register set or memory architecture of a particular computer, for instance, one may simply concentrate on solving the problem at hand. Thus, high-level languages are "portable," that is, they afford a level of abstract which permits a single program to be implemented on several different machines, including ones of vastly different architecture.
The task of handcrafting source code suitable for compilation into a program by a compiler has always been a labor-intensive chore. Accordingly, there has been much interest in improving the process. A particularly popular approach to this problem is to use "application generators" or "code generators." These are programs which generate basic source code for application programs. Examples include Borland's AppExpert, Microsoft AppWizard, and Borland's dBASE AppGen. Typically, a developer user provides such a tool with some initial input, for indicating the type of application program desired. The type of programs desired may include, for instance, a 16-bit Windows application with OLE (Object Linking and Embedding) capability and an MDI (Multiple Document Interface) interface. Based on these inputs, a typical application generation tool would generate complete source code for a working program which includes the attributes specified by the user. The program generated is essentially a "shell" program--that is, a bare-bones program which lacks core functionality for completing end user tasks. Thus, conventional application generators automate the task of writing the "boilerplate" code, which is necessary to get a program at least up and running.
In addition to receiving information regarding a particular type of application desired, application or code generators can also create source code in response to developer user input which "paints" an interface. Such a tool, such as Protogen.TM., allows the user to visually create an interface, using standard drag-and-drop methodology. After the interface is created, the developer user instructs the tool to generate the source code for the application program. In response, the application generation tool generates source code text files which include the necessary code for recreating and operating the user interface.
After the user has generated the shell program, he or she proceeds to add specific functionality to the program, using conventional coding techniques. The user may, for instance, write functions or procedures which operate in response to user selection of choices from a menu bar. The basic code for displaying the menu bar and getting end user choices was generated by the application generator. The developer user retrieves this code into a program editor and adds additional routines or functions for carrying out the application programs functionality which is to operate in response to end user selection of menu choices.
Although conventional application generators clearly facilitate the task of creating programs, they have a distinct disadvantage. In particular, these tools are all monolithic or "one-way" tools. Once the user has generated the source code for the application program and then modified it to include his or her functionality, the user cannot "go back" to the application generator to regenerate the code. If the user forgot to add a particular menu choice to the menu bar while he or she was visually "painting" the interface, he or she cannot return to the application generator to visually add this to the application program once the generated code has been modified by the developer user. Quite simply, conventional application generation tools do not understand the modifications added by the developer user. In other words, conventional application generation tools are very adept at generating the boilerplate code which is necessary for creating application programs; they are not adept, however, at understanding changes made to that boilerplate code once the user has begun editing the shell program for converting it into a "real" application program.
What is needed are system and methods for bi-directional application generation--that is, visual code generation tools which generate a source file, allow a user to edit the file with a text editor, then return to the visual code generation tool to further edit the form visually. More particularly, such a system should provide the developer with the ability to use both visual and text editing techniques interchangeably--switching at will. The present invention fulfills this and other needs.